home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.text;
-
- import java.awt.event.ActionEvent;
- import javax.swing.JEditorPane;
-
- public class StyledEditorKit$BoldAction extends StyledEditorKit.StyledTextAction {
- public StyledEditorKit$BoldAction() {
- super("font-bold");
- }
-
- public void actionPerformed(ActionEvent var1) {
- JEditorPane var2 = ((StyledEditorKit.StyledTextAction)this).getEditor(var1);
- if (var2 != null) {
- StyledEditorKit var3 = ((StyledEditorKit.StyledTextAction)this).getStyledEditorKit(var2);
- MutableAttributeSet var4 = var3.getInputAttributes();
- boolean var5 = !StyleConstants.isBold(var4);
- SimpleAttributeSet var6 = new SimpleAttributeSet();
- StyleConstants.setBold(var6, var5);
- ((StyledEditorKit.StyledTextAction)this).setCharacterAttributes(var2, var6, false);
- }
-
- }
- }
-